//
//  ZCTool.h
//  UniversalApp
//
//  Created by 凯朱 on 2019/5/30.
//  Copyright © 2019 徐阳. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"
NS_ASSUME_NONNULL_BEGIN

@interface ZCTool : NSObject
+(void)pushToLoginVc;
/**
 window上展示toast提示
 
 @param message 提示文案
 */
+(void)showToastOnKeyWindowWith:(NSString *)message;
+(NSString *)locaStrWith:(NSString *)str;

/**
 字典或数组转字符串  代替方法  +(NSString *)systemUtilsDataToJson:(id)dicOrArr
 
 @param dicOrArr 字典或数组对象
 @return json字符串
 */
+(NSString *)objectToJson:(id)dicOrArr;

/**
 json字符串转字典 - 有校验(解析失败或格式错误返回空字典)
 
 @param jsonStr json字符串
 @return 字典
 */
+(NSDictionary *)dictionaryWithJsonStr:(NSString *)jsonStr;

/**
 json字符串转数组 - 有校验(解析失败或格式错误返回空字典)
 
 @param jsonStr json字符串
 @return 数组
 */
+(NSArray *)arrayWithJsonStr:(NSString *)jsonStr;

/**
 处理图片并且保存资源到本地 - 保存的为相对路径
 
 @param image 图片
 @return 图片文件名 - 相对路径
 */
+(NSString *)saveImageToLocalWithImage:(UIImage *)image;

/**
 获取完整的文件路径名 - 绝对路径
 
 @param fileName 文件名
 */
+(NSString *)getFullFilePathWithFileName:(NSString *)fileName;

#pragma mark -
#pragma mark - ================<loading图>===============
+(void)showHudOnKeyWindow;
+(MBProgressHUD *)showHudOnKeyWindowWith:(NSString *)message;
+(void)showHudOnView:(UIView *)view;
+(MBProgressHUD *)showHudOnView:(UIView *)view message:(NSString *)message;
+(void)hideHudOnView:(UIView *)view;
+(void)hideHudOnKeyWindow;
+(void)showDefaultImageOnView:(UIView *)view;
+(void)showDefaultImageOnView:(UIView *)view message:(NSString *)message;
+(void)hideDefaultImageOnView:(UIView *)view;
+(UIImage *)getBgImage;
+(UIImage *)getJudgBgImage;
+(UIImage *)getScoreBgImage;
+(void)screenShotsAndSaveComplete:(void(^)(UIImage * img)) complete;
+(void)screenShotsComplete:(void(^)(UIImage * img)) complete;
//调用系统分享
+(void)shareWithTitle:(NSString *)title vc:(UIViewController *)vc;
/*获取当前视图的VC层*/
+(UIViewController *)getCurrentUIVC;
+(BOOL)isFullScreenIphone;
@end

NS_ASSUME_NONNULL_END
